const fs=require("fs");
exports.getMime = function (name) {
    switch (name) {
        case '.html':
            return 'text/html';
        case '.css':
            return 'text/css';
        case '.js':
            return 'text/javascript';
        default:
            return 'text/html';
    }
}

exports.getMimeJson = function (name) {
    name=name.slice(name.indexOf('.')+1)
    let result=fs.readFileSync('./static/json/mine.json')
    return JSON.parse(result.toString())[name]
}